#include "stdio.h"
#include "string.h"

struct typett
{
    int v,s;
}shu[4000];
int m,k,n,x,y;


void sort()
{
    int i,j,t;
    for (i=1;i<n;i++)
    	for (j=i+1;j<=n;j++)
    	{
    	    if (shu[i].v>shu[j].v)
    	    {
    	        shu[0]=shu[i];
    	        shu[i]=shu[j];
    	        shu[j]=shu[0];
    	    }    
	    }        
}    

main()
{
    int i,j,a,b;
    
    while (scanf("%d%d%d",&m,&k,&n)!=EOF)
    {
        for (i=1;i<=n;i++) 
        {
            scanf("%d",&shu[i].v);
            shu[i].s=i;
        }    
        sort();
        x=n/m;y=n%m;
        if (k<y)
        {
             a=(x+1)*k+1;
             b=a+x;
        }    
        else 
        {
        	a=(x+1)*y+x*(k-y)+1;
        	b=a+x-1;
       	}
       	for (i=a;i<b;i++)
       		for (j=i+1;j<=b;j++)
       			if (shu[i].s>shu[j].s)
       			{
       			    shu[0]=shu[i];
       			    shu[i]=shu[j];
       			    shu[j]=shu[0];
       			}    
       	printf("%d\n",shu[a].v);
        
    }    
    return 0;
}       